const _ = require('lodash');
/**
 * 缩写
 * @param {string} name 文件名
 */
function abbreviation(name) {
  const temp = _.kebabCase(name);
  let abb = '';
  for (var index = 0; index < temp.length; index++) {
    if (index === 0) {
      abb += temp.charAt(index);
      continue;
    }
    if ('-_.+#'.indexOf(temp.charAt(index)) >= 0) {
      abb += temp.charAt(index + 1) || '?';
    }
  }
  return abb;
}

function 

module.exports = { abbreviation };
